*Change the file path to your directory"
*Use Figure1.dta in order to generate Figure 1: Perceived credibility of news stories by party identification

use "/Figure1.dta"

*Generate the figure for Democrats 
twoway (bar mean fixgraph2 if label==3, color(navy))(bar mean fixgraph2 if label==1, color(midblue)) (bar mean fixgraph2 if label==2, color(blue))(rcap high low fixgraph2), legend (row(1) order(1 "Original" 2 "AI" 3 "AI Disclaimer")) xlabel( 2 "HuffPo" 6 "AP" 10 "Fox", noticks) xtitle("Ideological Slant") ylabel( 1 "Not at all credible" 2 "Not very credible" 3 "Somewhat credible" 4 "Very credible", angle(horizontal)) graphregion(color(white))

*Save the figure for Dems in your directory
graph save "/Figure1Dems.gph"

*Generate the figure for Republicans
twoway (bar mean fixgraph if label==3, color(cranberry))(bar mean fixgraph if label==1, color(red)) (bar mean fixgraph if label==2, color(pink))(rcap high low fixgraph), legend (row(1) order(1 "Original" 2 "AI" 3 "AI Disclaimer")) xlabel( 2 "HuffPo" 6 "AP" 10 "Fox", noticks) xtitle("Ideological Slant") ylabel( 1 "Not at all credible" 2 "Not very credible" 3 "Somewhat credible" 4 "Very credible", angle(horizontal)) graphregion(color(white))

*Save the figure for GOP in your directory
graph save "/Figure1GOP.gph"

*Combine the two into a 2-panel figure (make sure to include the correct directory for both file names)
graph combine "/Figure1GOP.gph" "/Figure1Dems.gph"
